-- clear_bonus
-- created by panyl
-- 全场清怪奖励

return {
    apply = function(prop, baseValue)
        return math.modf(baseValue + baseValue * prop[3] / 1000);
    end,
    
    trigger = function(who, prop, arg)
        local classId = prop[2];
        local count   = prop[3];
        local bonusType = iif(type(classId) == "string", 2, 1); -- 物品或者属性奖励
        
        -- 奖励
        BonusM.doBonus({bonusType, classId, count}, "prop clear_bonus");
        
        return true;
    end,

    record = function(target, prop, path)
        return false;
    end 
};